<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: sunset
<<<<<<< HEAD
  Date: 2021/8/16
  Time: 21:08
=======
  Date: 2021/8/17
  Time: 20:15
>>>>>>> d76f1d3 (2021暑假实训)
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的订单</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main1.css" media="all" >
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/reset1.css" media="all" >
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <script>

    </script>
</head>
<body>
<div>
    <div class="header_con">
        <div class="header">
            <div class="welcome fl">欢迎来到天天生鲜!</div>
            <div class="fr">
                <div class="login_btn fl">
                    <span>欢迎您</span>
                    <span>|</span>
                    <a href="${pageContext.request.contextPath}/user/touserrecord" name="user_name">${sessionScope.username}</a>
                </div>
                <div class="user_link fl">
                    <span>|</span>
                    <a href="${pageContext.request.contextPath}/user/touserrecord">用户中心</a>
                    <span>|</span>
                    <a href="cart.html">我的购物车</a>
                    <span>|</span>
                    <a href="${pageContext.request.contextPath}/order/OrderList?user_id=${user_id}">我的订单</a>
                </div>
            </div>
        </div>
    </div>
    <div class="search_bar clearfix">
        <a href="${pageContext.request.contextPath}/main/index" class="logo fl"><img src="../images/logo.png"></a>
        <form action="${pageContext.request.contextPath}/product/search" method="post" class="search_con fl">
            <input type="text" class="input_text fl" name="name" placeholder="显示全部商品">
            <input type="submit" class="input_btn fr" value="搜索">
        </form>
        <div class="guest_cart fr">
            <a href="#" class="cart_name fl">我的购物车</a>
            <div class="goods_count fl" id="show_count">${number}</div>
        </div>
    </div>
</div>

<%--<div class="order_title">--%>
<%--    <span class="title" >全部订单</span>--%>
<%--</div>--%>
<div class="row clearfix">
    <div class="col-md-12 column">
        <table class="table table-hover table-striped">
            <thead>
                <tr>
                    <th>下单时间</th>
                    <th>订单号</th>
                    <th>物流状态</th>
                    <th>商品名称</th>
                    <th>商品价格</th>
                    <th>商品重量</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <c:forEach var="order" items="${orderList}" >
                    <tr>
                        <td><fmt:formatDate value="${order.create_date}" pattern="yyyy-MM-dd hh:mm:ss"/></td>
                        <td>${order.id}</td>
                        <td>${order.state}</td>
                        <td>${order.name}</td>
                        <td>${order.price}</td>
                        <td>${order.weight}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/order/deleteOrder?id=${order.id}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </tbody>
        </table>
    </div>
</div>


<%--        <span class="order_t">下单时间:<fmt:formatDate value="${order.create_date}" pattern="yyyy-MM-dd hh:mm:ss"/></span>--%>
<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<%--        <span>发货时间:<fmt:formatDate value="${order.send_date}" pattern="yyyy-MM-dd hh:mm:ss"/></span>--%>
<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<%--        <span>订单号:${order.id}</span>--%>
<%--        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--%>
<%--        <span>${order.state}</span><br>--%>
<%--           <c:forEach var="product" items="${productList}">--%>
<%--                   <span>名称:${product.name}</span>--%>
<%--                   <span>价格:${product.price}元</span>--%>
<%--                   <span>重量:${product.weight}</span>--%>
<%--                   <span>数量:1</span><br>--%>
<%--&lt;%&ndash;                       <a href="#"><img class="img6" src="../images/goods/${product.id}.png" alt="图片加载中..."></a><br>&ndash;%&gt;--%>
<%--&lt;%&ndash;                       <a class="name" href="#">${product.name}</a>&ndash;%&gt;--%>
<%--&lt;%&ndash;                       <span class="weight">${product.sort2}</span>&ndash;%&gt;--%>
<%--&lt;%&ndash;                       <span class="weight">${product.weight}</span>&ndash;%&gt;--%>

<%--           </c:forEach>--%>

</div>
</body>
</html>
